import Login from '../pages/Login'
import Layout from '../pages/Layout'
import Four from '../pages/Errorpage/404'
import Five from '../pages/Errorpage/500'
import menuRoute from './menuroute'
import Welcom from '../pages/Welcom'
import Details from "../pages/Details"
import Camera from "../pages/Camera"

import PinAdd from '../pages/PinAdd/pinadd'
// console.log(menuRoute)
const routes = [
    {
        path: '/layout',
        component: Layout,
        children: [{
            path: '/layout/welcom',
            component: Welcom,
        },
        {
            path: '/layout/pinadd',
            component: PinAdd
        },
        ...menuRoute,
        {
            from: '/layout',
            to: '/layout/welcom'
        }
        ]
    }, 
    {
        path: '/login',
        component: Login,
    },
    {
        path: '/four',
        component: Four
    },
    {
        path: '/five',
        component: Five
    },
    {
        path: "/details",
        component: Details
    },
    {
        path:"/camera",
        component:Camera
    },
    {
        from: '/',
        to: '/layout'
    },
    {
        path: '*',
        component: Four
    }
]

export default routes